Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Simplify/fix when to check for designated invalid function #5661

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

haltman-at
Copy link
Contributor

I was going over this code with @cds-amal and realized it could be simplified. I noticed that when the index is not -1, but we don't have an AST, we didn't check for the designated invalid function. I was like, wait, why don't we? I should add that check. And then I realized these could be combined -- if the index is -1, then ast will necessarily be undefined, so checking if the index is -1 really doesn't need to be separate. So, now it's simplified a bit.

I only did manual testing of this since it requires old Solidity versions to hit this code. I tested it on 0.5.0, it worked fine.

@haltman-at haltman-at requested review from gnidan and cds-amal October 28, 2022 21:39
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@haltman-at haltman-at merged commit dda013c into develop Oct 28, 2022
@haltman-at haltman-at deleted the simplify-invalid-check branch October 28, 2022 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants